console.info('server...');
console.info();
var net=require('net');
var HOST='127.0.0.1';
var port=9696;
console.info('new..')
console.info(' ')
net.createServer((sock)=>{
    console.log('listening'+HOST+':'+port)
    console.log('connected'+sock.remoteAddress+':'+sock.remotePort);
    console.info()

    sock.on('data',(data)=>{
        console.info('data '+sock.remoteAddress+':'+data)
        console.info()
        sock.write('server write '+data+'');

    })
    sock.on('close',(data)=>{
        console.log('close'+sock.remoteAddress+' '+sock.remotePort);
        console.info()
    })

}).listen(port,HOST);
